OBJECTS = creep.o drawer.o input.o main.o object.o scene.o spawner.o tower.o util.o
GCC = g++
CCFLAGS = -O2 -std=gnu++0x -Wall -Wextra
LIBS = -lSDL -lSDL_image -lSDL_ttf -lSDL_gfx

all: gtd

creep.o: creep.cpp
	$(GCC) $(CCFLAGS) -c creep.cpp

drawer.o: drawer.cpp
	$(GCC) $(CCFLAGS) -c drawer.cpp

input.o: input.cpp
	$(GCC) $(CCFLAGS) -c input.cpp

main.o: main.cpp
	$(GCC) $(CCFLAGS) -c main.cpp

object.o: object.cpp
	$(GCC) $(CCFLAGS) -c object.cpp

scene.o: scene.cpp
	$(GCC) $(CCFLAGS) -c scene.cpp

spawner.o: spawner.cpp
	$(GCC) $(CCFLAGS) -c spawner.cpp

tower.o: tower.cpp
	$(GCC) $(CCFLAGS) -c tower.cpp

util.o: util.cpp
	$(GCC) $(CCFLAGS) -c util.cpp

gtd: $(OBJECTS)
	$(GCC) $(CCFLAGS) -o gtd $(OBJECTS) $(LIBS)

clean: 
	rm -rf *.o gtd

dist: all
	7z a winbuild.zip *.dll gtd *.ttf

PHONY: clean
